fix required bug