debug and fix the mongodb