mongodb closure fixed