better navigation handling