Fix database offline mode