 		{
 			var bmp : BitmapData = new BitmapData(source.readShort(),
 												  source.readShort());
-
-			bmp.setPixels(bmp.rect, decodeBytes(source));
+			
+			var bytes : ByteArray = decodeBytes(source);
+
+			bmp.setPixels(bmp.rect, bytes);
 
 			return bmp;
 		}

		private static const TYPE_BYTES			: uint	= 7;
		private static const TYPE_BOOLEAN		: uint	= 8;
		private static const TYPE_BITMAP_DATA	: uint	= 9;


		private static const ENCODERS		: Array		= [encodeCustomObject,
														   encodeObject,
														   encodeArray,

			var ba : ByteArray = new ByteArray();
			var length : int = source.readInt();

			source.readBytes(ba, 0, length);

			return ba;
		}
