manual merge of https://github.com/neo4j/neo4j/pull/704