Fixing internal whitespace detection