Fixed the selected replacement search