Handle offline mode properly