Fixed classes being removed/added from incorrect element.