Working in loop fix