Fixed incorrect add/removeClass placements on window resizing