Adjust Flags optimization