Make database offline mode work