fixed GPIO code for recent GPIO library