Fix for math error on crank timing optimisation