revert buildpages.js changes