correcting string comparison in self destructive key