Tried to fix the deleteAll function in History. Could not manage