fix mislocated end tag