fix problem with #excludes patterns