bug fixes for start time and end time.