Some fixing for cases where the app layer is disconnected