remove spurious trailing spaces