Fix some ugliness with the app instance.