Fixed an error when trying to get the message ID.