fix issue with whitespace input