Fix error in History table if stack does not exist

Change-Id: Ic47761ddff23207a30eae0b7b523a996c545b3ba
Merge "Fix error in History table if stack does not exist"