added some codes to check inconsistency among model flags.