fixed sync replica. Used callbacks.