Fix the navigation logic because it's needlessly complex