The 18 December 2006 Act on the entry and residence of third-country nationals both improved and worsened long-term residence policies, resulting in a score exactly halfway to best practice. Migrants must now live in Hungary for longer before they are eligible for a long-term residence permit, though time spent in Hungary as a student or asylum seeker now counts. Although there is no integration test, the conditions include a new insurance requirement and the procedure is still long and expensive. Hungary has the second lowest score after LV on the security of long-term residence, although the new law did limit the grounds for withdrawing a permit and introduced some new protections against expulsion. Long-term residents have the same rights as Hungarians to employment, self-employment, social security, health care, housing and free movement and residence within the EU.