Fixed flag location logic