Change with PR #719 and close mongoengine/Issue #397