Fixed up some maths