making it so invalid pages don't display on the index