Bugfix: Correct cycle exit