Fixed newmsg.py crash on empty messages.