Fixed timing bug