Fix problem with whitespace detection