Fixing a few issues with Firefox compat