Fixing app start logic