 			{
 				for each (var buffer:Image in buffers)
 					buffer.visible = buffer === back_buffer;
-				back_buffer = buffers[buffers.indexOf(buffer) ^ 1];
+				back_buffer = buffers[buffers.indexOf(back_buffer) ^ 1];
 				rendering = false;
 			}
 		}

				addChild(back_buffer).addEventListener(Event.COMPLETE, handleImageComplete);
		}

		public function handleEnterFrame():void
		{
			var interval:int = getTimer() - last_update;
			if (rendering || interval < MIN_FRAME_INTERVAL || !elementId.value)

			WeaveAPI.StageUtils.callLater(this, updateImage);
		}

		private function updateImage():void
		{
			if (!elementId.value)
			{
