fix bug in PutHandle.py