fix selection and copying