Fixed bug when no internet connection is detected