Added code to enable tab choice from nav bar.