fixed bug in generate min value (no allies on target node)