Fixed Firefox bug

Fixed Firefox bug that wouldn't run the change class function correctly.