fixes to refs