infinite loop fix for injecting