[fix] various fixes across the message memory scheme