fix cycle detection bug
Merge branch 'master' of github.com:lehtmets/ut-pert