fixing some timing issues