Uncommented vector::resize, resulted in segfault