replace unneeded trailing space in message