adjusts some logic to be cleaner, and fixes a double release on regions.