fix pages js