added condition for navigation to be shown