History navigation bugfix