Fix bug when there is no internet connection.