Fix ref and names.