Selection bug fix