Fix select order - inputs/outputs