Better handling of selection