fixed bug in region detection. Small changes in the config file