Fixed bug on replication during db deployment