Bug fix. Reset size information when clearing the history.

Otherwise the next historyAdd will access freed memory, and crash.