Fixed compatibility issues with Firefox.