Fix issue with filter on sibling and children selectors
Trim class names after removing or adding class