fixed broken pin reading in samples