fixed timing and updating bugs