remove incorrect NextState.fail, go directly to error state if state method return null nextState