 		</tr>
 
 		<cfquery name="thisChanges" dbtype="query">
-			select * from d where locality_id=#lid# order by changedate desc
+			select * from d where locality_id=#dlocid.locality_id# order by changedate desc
 		</cfquery>
 		<cfloop query="thisChanges">
-			<tr class="datarow" data-lid="#lid#">
+			<tr class="datarow" data-lid="#dlocid.locality_id#">
 				<td>#changedate#</td>
 				<td>#whodunit#</td>
 				<td>#LOCALITY_ID#</td>


	<cfdump var=#d#>


	<cfif d.recordcount is 0>
		No archived information found.<cfabort>

			<th>WKT-hash</th>
			<th>Remark</th>
		</tr>
	<cfloop query="dlocid">
		<cfquery name="orig" datasource="uam_god">
			select locality_id,
			 	geog_auth_rec_id,
