Added a workaround for Firefox timing bug