set_ref command fixed