Fix selection bug