fix for #2: handle empty required attribute right