Fixed check for pin>0xF not 0xFF