fixed issue with scanner removing whitespace