fixed bug for save results on mongodb