Merge pull request #2594 from baruchsiach/fix-math-2