Don't clear the opt instance in the diff example. The version field is overwritten otherwise. The opt instance is already initialized properly.