remove trailing space in message