Fix issue where new tabs weren't being looked for when an old one was closed