Defensive copy

Change-Id: I3e98df901ccd350a46d48184da869bcfca46d5fb