fix bug: allow trailing whitespace after entire input