Bulding patter loop fix