closed a ref