Fix a loop in the QA environment