Ensure app is destroyed nicely (resets timer and flag)