fixed Pin.py