Replace wstring::pop_back with a resize

string::pop_back is a C++11 feature