bugfix for when connection error, appdata deleted