Fixed JS calculation of number of ticks between decision points.