fix: state.prev must be previous value.