Fix minor bugs in DigitalInOut pin usage