 			// flag unused vertices by scanning the index buffer
 			var oldVertexIdToUsage : Vector.<Boolean> = new Vector.<Boolean>(oldNumVertices, true);
 			for (indexId = 0; indexId < numIndices; ++indexId)
-				oldVertexIdToUsage[indexData.readShort()] = true;
+				oldVertexIdToUsage[indexData.readUnsignedShort()] = true;
 			
 			// scan the flags, fix vertex buffer, and store old to new vertex id mapping
 			var oldVertexIdToNewVertexId : Vector.<uint> = new Vector.<uint>(oldNumVertices, true);

			indexData.position = indexDataStartPosition;
			for (indexId = 0; indexId < numIndices; ++indexId)
			{
				var index : uint = indexData.readShort();
				
				indexData.position -= 4;
				indexData.writeShort(oldVertexIdToNewVertexId[index]);

				var partialIndexData	: ByteArray			= new ByteArray();
				
				// local variables
				var oldVertexIds		: Vector.<uint>		= new Vector.<uint>(3, true);
				var newVertexIds		: Vector.<uint>		= new Vector.<uint>(3, true);
				var newVertexNeeded		: Vector.<Boolean>	= new Vector.<Boolean>(3, true);
				
				var usedVerticesDic		: Dictionary		= new Dictionary();	// this dictionary maps old and new indices
