Fix status update before idling.
Fix Flask app.