removeClass and replaceClasses helpers fix