fix trailing space issue