Fixing crossbrowser bug