fixed some timing errors