Fix message_list loop with a map