Fixed a bug where the app didn't exit after it was closed on Android.
This bug caused the app to crash when it was restarted.