Fix bug in all_pages view