Corrected bug when specifying a region