keep the selected index.