fixed small issue in stop time calculation