remove dead references.