Fixed exception when receiving a pm