Fix for broken shutdown with embedded neo4j db