gpio basic fixes (input detection)