Fixed errors in GPIO code