Tweaking logic to ensure that the app has fully started