optimized replication, test fix in Connection