fixed the failed region setting bugg