Copying reference variables