Use message_dict instead of messages