fixed issue with replication lag