fixed GetMsgBySize() method