remove redundant attributes.