remove references to keys