updates to fix static pages function