major changes in mongo bug fix