Changes for newer maths lib