Fix some timing issues