fixed timing bug in Firefox