Fixed ReplaceSelection for Selector.