Added determining of allowed tab.