clearselection on mode change