Fix Maths functions