Replication consistency and bug fixes