When trying to select a user or competency the first select would not work. Worked fine on the second select. This fixes that problem and tidies up the code.