fix bug in mongo