Fixed tab functionality to display proper state