Fix broken logic in start/end time updating method