Fixed bug in add/remove class