Fixes some bugs in Firefox