fix crash on history view