fixing the loop issue on archives