Properly unmarshal byte slices for keys