fixing bug with mongoengine adapter