Fix copies lookup algorithm