archive and category-loop bug fixes