Fix width selection and cleanup