Remove trailing \n from messages.