fixing bug with loading in firefox