compatibility fixes for Firefox