fixed bug on whitespace handling