Fixing the tab switching and default tab bug on firefox.