Use iterator properly.

When you erase, you assign the return value to the iterator.