remove extra space at end of line