fix replicate