corrects input pin order