Fixed when to update the next_interval