fixed bug for query mongodb