fixed required bug