remove trailing spaces as well.