fixed some bugs in PullMessage.py