|  | @@ -59,6 +59,7 @@ function normalizeKey(key) {
 | 
	
		
			
				|  |  |  function validate(key, value) {
 | 
	
		
			
				|  |  |    if (_.endsWith(key, '-bin')) {
 | 
	
		
			
				|  |  |      if (!(value instanceof Buffer)) {
 | 
	
		
			
				|  |  | +      console.log(value.constructor.toString());
 | 
	
		
			
				|  |  |        throw new Error('keys that end with \'-bin\' must have Buffer values');
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    } else {
 | 
	
	
		
			
				|  | @@ -173,7 +174,9 @@ Metadata.prototype._getCoreRepresentation = function() {
 | 
	
		
			
				|  |  |  Metadata._fromCoreRepresentation = function(metadata) {
 | 
	
		
			
				|  |  |    var newMetadata = new Metadata();
 | 
	
		
			
				|  |  |    if (metadata) {
 | 
	
		
			
				|  |  | -    newMetadata._internal_repr = _.cloneDeep(metadata);
 | 
	
		
			
				|  |  | +    _.forOwn(metadata, function(value, key) {
 | 
	
		
			
				|  |  | +      newMetadata._internal_repr[key] = _.clone(value);
 | 
	
		
			
				|  |  | +    });
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |    return newMetadata;
 | 
	
		
			
				|  |  |  };
 |