Maybe fix for Firefox 31

Still need to test more comprehensively