Fixing a logic error in the handling of region_name.