Amendments to the Cable Act and nationality laws continued until 1940, when married women were granted their own nationality without restriction. That year, Congress amended the Nationality Act, distinguishing for the first time different rules for derivative nationality for legitimate and illegitimate children. Under the provisions, children born out of wedlock passed from mother to child automatically, but required legitimization of paternity prior to a child reaching the age of majority for derivative nationality from the father. The 1940 Act also allowed all women who had previously lost their citizenship because of marriage to repatriate without regard to their marital status, by swearing the oath of allegiance, as opposed to the previous policy of repatriation by naturalization. Racial exclusions for derivative naturalization of husbands of U.S.-citizen wives remained in place until passage of the McCarran-Walter Act in 1952. Though it ended utilizing race as a criterion for admission to the country of nationalization, continued use of quotas to restrict immigration from Asian countries did not end racial exclusion. Until immigration laws were reformed by the Immigration and Nationality Act of 1965, the restrictive quota system remained in place.