clean the trailing spaces