fix for detachAllWithCycle unit test