remove extra space at end of message