fix the whitespace detection