Fixed db connecton pool bug