 					arrayAppend(ov,older);
 					qry.otherVersions[row]=ov;
 				}
-				qry.deleteRow(row+1);
+				queryDeleteRow(qry,row+1);
 			}
 
 

			    returnVariable="local.locals" ;
			// add column if necessary
			loop list="#locals.columnlist()#" item="local.k" {
                if(!qry.columnExists(k)) qry.addColumn(k,[]);
            }
            qry.addColumn('otherVersions',[]);

			loop query="#locals#" {
				var row=qry.addrow();
				qry.setCell("provider","local",row);
				loop list="#locals.columnlist()#" item="local.k" {
            		qry.setCell(k,locals[k],row);


            	}
				else {
					row=queryAddRow(qry);
					qry.setCell("provider",provider,row);
					qry.setCell("lastModified",data.lastModified,row);
	            	loop list="#data.extensions.columnlist()#" item="local.k" {
