patch to allow handling of regions