Change $ to $$ in equations.