Minor fixes to pages.js and page index