Fixing pop_back on string error