fixed some whitespace handling
Merge pull request #6 from ap1/master

fixed some whitespace handling