fix archive page logic