Fix bug.
Add replicate script.