Fix issue #63 improper setting of null state during connection failure.