 			
 			for (index = 0; index < _insertScriptDataTags.length; index++)
 			{
+				tag = _insertScriptDataTags[index];
+				
+				if (tag == null)
+					continue;
+
 				bytes = new ByteArray();
-				tag = _insertScriptDataTags[index];
-				
-				if (tag != null)
-				{
-					tag.timestamp = timestamp;
-					tag.write(bytes);
-					attemptAppendBytes(bytes);
-					processed += bytes.length;
-				}
+				tag.timestamp = timestamp;
+				tag.write(bytes);
+				appendBytes(bytes);
+				processed += bytes.length;
 			}
 			_insertScriptDataTags.length = 0;
 			_insertScriptDataTags = null;			

		private function insertScriptDataTag(tag:FLVTagScriptDataObject, first:Boolean = false):void
		{
			if (!_insertScriptDataTags)
			{
				_insertScriptDataTags = new Vector.<FLVTagScriptDataObject>();
			}
			
			if (first)
			{
				_insertScriptDataTags.unshift(tag);	
			}
			else
			{
				_insertScriptDataTags.push(tag);
			}
		}
		
		/**

				}
			}

			if(_enhancedSeekTarget == Number.MAX_VALUE)
			{
				CONFIG::LOGGING
				{
					logger.debug("Left over enhanced seek-to-end, aborting (_seekTarget=" + _seekTarget + ").");
				}
				_enhancedSeekTarget = NaN;
				_seekTarget = NaN;
			}

			var realTimestamp:int = wrapTagTimestampToFLVTimestamp(tag.timestamp);
			var currentTime:Number = realTimestamp / 1000.0;

