Remove ending div markers

Related to issue #486