Fixed selection bug