archive loop fix