Fixed off-by-one error in log message in cleanhistory