Fixed all valgrind warnings from history.cpp