bug fix connection close on mongodb