Changed to use the native for flag checking