Select correct input when multiple are present