Fix the selection bug.