Bugfix : invalid array reference
Fixed to not recalculate min keys while matching.