db_replicate internal fix