Improve autoselect function. :smiley_cat: