Fixed history function, was broken

Change-Id: I9834ed6d117bc14fa8b4f98ad97356e94edf36e3