remove trailing sopaces