fix flat pages