EQS Distance to querier not scoring correctly

HI, i made a simple grid generator with 2 test: the first one trace the visibility from the enemies, and the second should score the remaining items with inverse linear, but as you can see from the image there is a huge error.

The eqs mark as winner an item that obviusly don’t have the highest score nor is the nearest one, and i can’t figure it out why. The query is very simple, and i think its correct.

Any ideas?