Use pop_back rather than resize