bugfix for ids in fetch_var_by