Fixed cycle detection.