Properly clear history