Fixes #126
Merge branch 'fixes/math' into develop