debug loop fix