fixing a ref