selection bug fix