Fixed the issues of crushing when there is no network in restarting the
application