             // to handle this differently, but there's little practical use for that.
             if (_currentQueryHandler) {
                 _currentQueryHandler.handleCompletion('EMPTY QUERY');
-                _currentQueryHandler = null;
             } else {
                 onProtocolError(new ProtocolError("Unexpected EmptyQueryResponse"));
             }

        private function handleRfq(msg:ReadyForQuery):void {
            _rfq = true;
            _status = msg.status;
            _connHandler.handleReady(_status);
        }

        private function handleNotification(msg:NotificationResponse):void {
            _connHandler.handleNotification(msg.condition, msg.notifierPid);
        }

        private function handleNotice(msg:ResponseMessageBase):void {
            _connHandler.handleNotice(msg.fields);
        }

        private function handleError(msg:ErrorResponse):void {
            _connHandler.handleSQLError(msg.fields);
            if (_currentQueryHandler) {
                _currentQueryHandler.dispose();
                _currentQueryHandler = null;
            }
        }

        private function handleMetadata(msg:RowDescription):void {

            if (_currentQueryHandler) {
                flushPendingResults();
                _currentQueryHandler.handleCompletion(msg.command, msg.affectedRows, msg.oid);
            } else if (_hasCodecError) {
                _hasCodecError = false;
            } else {
