remove bad reference