Fixed some logic inside the apps method