Fix function to compute value prior to replication.