restore selection if there was one after Substitute, fixed SetSelection