Bug fix for quickly exiting an app.