Focus input on selection and fixes bad scope definition.