fixed segV in selectionChanged().