Fix errors with offline mode