state mgmt fix