fixing bugs that occur when there’s no network connection