Fixed compatibility issues with firefox