Fix missing initialization of error state.