inf loop fix