Fixing bug on firefox with className