 				_isError = true;
 				trace(e.getStackTrace());
 			}
-			
+
 			_loader.removeEventListener(IOErrorEvent.IO_ERROR, dispatchEvent);
 			_loader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, dispatchEvent);
 			_loader.removeEventListener(ProgressEvent.PROGRESS, dispatchEvent);
 			_loader.removeEventListener(Event.COMPLETE, _onComplete);
 			_loader = null;
-			
+
 			if (_isError) {
 				dispatchEvent(new ErrorEvent(ErrorEvent.ERROR, false, false, _result.description));
 			} else {

			bodyByte.writeInt(args.length); // length of AMF0 arguments array
			for each (var arg:* in args) {
				switch (true) {
					// TODO: needs to investigate which type should be serialized as AMF3.
					// currently only ByteArray is serialized as AMF3.
					case arg is ByteArray: amf3 = true; break;
					default: amf3 = false;
				}
				if (amf3) {

package sh.saqoo.net {

	import sh.saqoo.logging.dump;

	import flash.events.ErrorEvent;
