remove dead references