Add missing div [MJ-472]

A div was being opened in an if statement but closed outside it.