fixed logic errors in SendMsgToAll() and SendSysMsg()