Fix connection pool bug