Fixed StackOverflow when adding exclusions