fix timing bug in Chrome