fix for #788, only set required flag if true