fix issues when tabs are open