History navigation fix