Added background task for leaving region