Improve history behavior