removing bad reference