Add type to messages