Fix JavaScript error message in page.js