timing bug fix