Fixes up bugs in GPIO reading version