Fixed some timing issues