Fixed the mongodb query.