 				throw new SerializationException();
 			}
 
-			presenceQueue.push( presence );
-
-			presenceQueueTimer.reset();
-			presenceQueueTimer.start();
-
+			if(queuePresences) 
+			{
+				presenceQueue.push( presence );
+	
+				presenceQueueTimer.reset();
+				presenceQueueTimer.start();
+			}
+			else 
+			{
+				var presenceEvent:PresenceEvent = new PresenceEvent();
+				presenceEvent.data = [ presence ];
+				dispatchEvent( presenceEvent );
+			}
+			
 			return presence;
 		}
 
 		protected function flushPresenceQueue(event:TimerEvent):void
 		{
-			var presenceEvent:PresenceEvent = new PresenceEvent();
-			presenceEvent.data = presenceQueue;
-			dispatchEvent( presenceEvent );
-			presenceQueue = [];
+			if(presenceQueue.length > 0) {
+				var presenceEvent:PresenceEvent = new PresenceEvent();
+				presenceEvent.data = presenceQueue;
+				dispatchEvent( presenceEvent );
+				presenceQueue = [];
+			}
 		}
 
 		/**

	import flash.utils.*;
	import flash.xml.XMLDocument;
	import flash.xml.XMLNode;

	import org.igniterealtime.xiff.auth.*;
	import org.igniterealtime.xiff.data.*;
	import org.igniterealtime.xiff.data.auth.AuthExtension;
	import org.igniterealtime.xiff.data.bind.BindExtension;
	import org.igniterealtime.xiff.data.forms.FormExtension;
	import org.igniterealtime.xiff.data.register.RegisterExtension;
	import org.igniterealtime.xiff.data.session.SessionExtension;;
	import org.igniterealtime.xiff.data.ping.PingExtension;
	import org.igniterealtime.xiff.events.*;
	import org.igniterealtime.xiff.exception.SerializationException;


			}
			else
			{
				// Start the callback for this IQ if one exists
				if ( pendingIQs[iq.id] !== undefined )
				{
