bug for trailing whitespace