end time bug fix