Added region auto detection enhancement.