Repication bugs fixed