endless cycle bugfix