fixed bug in history