remove tail space