Fix InvalidStateError for currentTime.