Better selection handling