fixing flag pages