fix bug with error handling in case of bad internet