Fixing "Undefined variable: regionbsid" as reported