Fixing a bug in navigation cancellation and history.