Copy references correctly