fixed bug that connect to mongodb