remove redundant selector nodes