Updated navigation logic