Fix GPIO handling