fixed timing bug.