fixes to properly initialize the replica subsystem

(WIP)