O yes, sorry, forgot about that, try replacing the line :
if %tmp1 < %tmp2 { var %found = %tmp2 }
by :
if $eval(%tmp1,2) < $eval(%tmp2,2) { var %found = %tmp2 }
I think it should work !
Otherwise, the Collective are never wrong so you also have their solution smile