Fixed db connection issue