Fix a bug in validator, always return deep copy of the input object

+ test it.