Fixed elitism implementation in #replace!