 			applyBindingChanges();
 			
 			_numEnabledPasses = 0;
-			_numDrawCalls = 0;
-
+            
 			var context			: Context3DResource	= viewport.context3D;
 			var backBuffer 		: RenderTarget		= getRenderingBackBuffer(viewport.backBuffer);
 			var numPasses		: uint 				= _passes.length;

				
				for (var j : uint = 0; j < numCalls; ++j)
				{
					_numDrawCalls++;
					call = calls[j];
					if (call.enabled)
					{
						_numEnabledDrawCalls++;
						numTriangles += call.apply(context, previousCall);
						previousCall = call;
					}

    			var numDrawCalls	: uint	            = drawCalls.length;
                
    			unbindEffectInstance(effectInstance, meshBindings);
                
                if (_numDrawCalls == 0)
                    throw new Error();
    			
    			for (var drawCallId : uint = 0; drawCallId < numDrawCalls; ++drawCallId)
    			{
