fixes TrimDirectiveWhitespaces issue