bug fixing mongoengine