Solved bug of the integer division in timestep