index and single page fix