fix required attr issue