Fixed quality bug introduced with auto-for loop