Fix a critical bug which set a unit state value as a store state