fixed bug wrong path is checked for repetitions