fixed required match bug