Bug fixes for Firefox