Fixes in reading the state.