remove extraneous trailing whitespace