Fix incorrectly nested html