add in/activetab state to fix ui bugs