Fix issue https://github.com/orientechnologies/orientdb/issues/3112