fixed bug with math tags