fixed bug with unexpected token on only whitespace input