pop_back and resize working