small fix to error handling of reference management on model