Fix a bug related to the root state