Fixed the exclusion phase of the algorithm