Corrected for error in calling endTime.