Tweaked cycle detection formatting.  Addressed thread safefy issue.