[fix] mantis #5548 (when the max is determined to be vulnerable fixed calc for min value) and fix closed vector search