Reverted the calculation of number of ticks in output.ml to be correct