 			if( isActive() ) {
 				if( o is IQ ) {
 	                var iq:IQ = o as IQ;
-	                if (iq.callbackName != null && iq.callbackScope != null)
+	                if ((iq.callbackName != null && iq.callbackScope != null) || iq.callback != null)
 	                {
 	                	addIQCallbackToPending( iq.id, iq.callbackName, iq.callbackScope, iq.callback );
 	                }		

				trace(someData);
			}
			// Data is untyped because it could be a string or XML
			socket.send( someData );
			var event:OutgoingDataEvent = new OutgoingDataEvent();
			event.data = someData;
			dispatchEvent( event );

					closingStreamTag = new String( "</stream:stream>" );
					break;
			}
			_socket.connect( server, port );
			return true;
		}
		
