Fixed typo in get_messages