fix the bug for the offline mode