 			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 );
 	                }		

			
			// Cancel everything by closing connection
			try {
				socket.close();
			}
			catch (error:Error){
				

		
		public function XMPPConnection()
		{	
			
			// Hash to hold callbacks for IQs
			pendingIQs = new Object();
