Fixed small mongodb bug