Fix selecting bug