Remove invalid attributes.