Added some error checking when connecting to a region #6444