selection and bug fix