fixed a bug in pumpMsgs.