adds missing closing divs