 				else
 					result = compileFunctionCall(new CompiledConstant(OPERATOR_PREFIX + '?:', operators['?:']), [condition, trueBranch, falseBranch]);
 				
-				tokens.splice(left - 1, right - left + 3, result);
+				tokens.splice(left - 1, end - left + 1, result);
 			}
 			// stop if any branch operators remain
 			if (Math.max(tokens.indexOf('?'), tokens.indexOf(':')) >= 0)

					trace("compiling tokens (", subArray.join(' '), ")");
				compiledParams = compileArray(subArray);

				if (tokens[open] == '[') // this is either an array or a property access
				{
					if (compiledToken)
					{

			operators["?:"] = constants['iif'];
			// multiple commands
			operators[','] = function(...args):* { return args[args.length - 1]; };
			operators['{}'] = operators[',']; // equivalent functionality but must be remembered as a different operator
			//assignment operators -- first param becomes the parent, and the two remaining args are propertyName and value
			assignmentOperators['=']    = function(o:*, ...a):* { for (var i:int = 0; i < a.length - 2; i++) o = o[a[i]]; return o[a[i]] =    a[i + 1]; };
			assignmentOperators['+=']   = function(o:*, ...a):* { for (var i:int = 0; i < a.length - 2; i++) o = o[a[i]]; return o[a[i]] +=   a[i + 1]; };
