infinite loop fix 2