add endless cycle check in default setup.