Added error handling for tab bar with no tabs.