fixes a bug that would sort posts in reverese on the index and archive page