Fix connection pool synchronization