changed the region leave/join check