 		loc.iEnd = ListLen(arguments.formats);
 		for (loc.i=1; loc.i <= loc.iEnd; loc.i++)
 		{
-			if (application.wheels.showErrorInformation && !ListFindNoCase(loc.possibleFormats, ListGetAt(arguments.formats, loc.i)))
-			{
-				$throw(type="Wheels.invalidFormat", message="An invalid format of `#ListGetAt(arguments.formats, loc.i)#` has been specific. The possible values are #loc.possibleFormats#.");
-			}
-		}
-		variables.$class.formats.actions[arguments.action] = $listClean(arguments.formats);
+			loc.item = ListGetAt(arguments.formats, loc.i);
+			if (get("showErrorInformation") && !ListFindNoCase(loc.possibleFormats, loc.item))
+			{
+				$throw(type="Wheels.invalidFormat", message="An invalid format of `#loc.item#` has been specified. The possible values are #loc.possibleFormats#.");
+			}
+		}
+		variables.$class.formats.actions[arguments.action] = arguments.formats;
 	</cfscript>
 	<cfreturn>
 </cffunction>

	</cfscript>
</cffunction>

<cffunction name="$acceptableFormats" access="public" output="false" returntype="string" hint="">
	<cfargument name="action" type="string" required="true">
	<cfscript>
		var returnValue = variables.$class.formats.default;
		if (StructKeyExists(variables.$class.formats, arguments.action))
		{
			returnValue = variables.$class.formats[arguments.action];
		}
	</cfscript>
	<cfreturn returnValue>
</cffunction>

<cffunction name="$generateRenderWithTemplatePath" access="public" output="false" returntype="string" hint="">
	<cfargument name="controller" type="string" required="true">
	<cfargument name="action" type="string" required="true">
	<cfargument name="template" type="string" required="true">
	<cfargument name="contentType" type="string" required="true">
	<cfscript>
		var templateName = "";
		if (!Len(arguments.template))
		{
			templateName = "/" & arguments.controller & "/" & arguments.action;
		}
		else
		{
			templateName = arguments.template;
		}
		if (Len(arguments.contentType))
		{
			templateName &= "." & arguments.contentType;
		}
	</cfscript>
	<cfreturn templateName>
</cffunction>

<cffunction name="$formatTemplatePathExists" access="public" output="false" returntype="boolean">

		loc.iEnd = ListLen(arguments.formats);
		for (loc.i=1; loc.i <= loc.iEnd; loc.i++)
		{
			loc.item = ListGetAt(arguments.formats, loc.i);
			if (get("showErrorInformation") && !ListFindNoCase(loc.possibleFormats, loc.item))
			{
				$throw(type="Wheels.InvalidFormat", message="An invalid format of `#loc.item#` has been specified. The possible values are #loc.possibleFormats#.");
			}
		}
		variables.$class.formats.default = ListAppend(variables.$class.formats.default, arguments.formats);
	</cfscript>
	<cfreturn>
</cffunction>
