avoid compilation halt by adding cyclic check