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

			}

			// If it's an error, handle it

			if ( iq.type == IQ.TYPE_ERROR)
			{
				dispatchError( iq.errorCondition, iq.errorMessage, iq.errorType, iq.errorCode );
			}
			else
			{

				// Start the callback for this IQ if one exists
				if ( pendingIQs[iq.id] !== undefined )
				{
					var callbackInfo:* = pendingIQs[iq.id];

					if (callbackInfo.methodScope && callbackInfo.methodName)
					{


			establishSession();
		}
		
		/**
		 * Error handler callback
		 * @param	packet
		 */
		protected function handleBindError(packet:IQ):void
		{
			
		}

		/**
		 * @private
