Fixed offline mode, but is not secure yet