fix app not loading the first time