Fix the object copy implementation.