Fixed a pin number bug