strip duplicate references