corrected I/O pin directions