fix end tag stuff