bug fix on pin numbers