 			}
 
 			// if value was passed in
-			if (StructKeyExists(loc, "value")) {
-
+			if (StructKeyExists(local, "value")) {
 				// just assign simple values
 				if (NOT IsObject(local.value)) {
 					arguments[local.key] = local.value;

	// return correct url with arguments set
	return urlFor(argumentCollection=arguments);
}
</cfscript>

}

public string function $namedRoute() {
	// determine route name and path type
	arguments.route = GetFunctionCalledName();

