cleaning up old image refs