Fixed compatibility issue with Firefox