Remove extra closing tags