Added some fixes for const vector<T> &