avoid mongo cursor crashs