Fixed compatibility problems with Firefox