fixed replicate selection bug