fixed few bugs when the app was loading - now it works good