use cancel when the app goes to background.