Fix closing tag generation