fixed bug where the END tag was missing with -Tm