Fix bugs with math formulas view

Fix bugs with math formulas view in Assignments, AssignmentView and
MathAssignments views