bugfix in max_vertex_value: reduce local_halt_flag to global_halt_flag to determine halt or not