Fix priority order for inputs.