check_rep_lag modified