Bug fixes for firefox