added error checking to the regions page