Fixed serialization clone helper