top selection bug fix