fix bugs in sent message ids to union