Fix potential timing overflow issues