Fix redundant/missing closing div tags