Fix open and closed tabs