fix for closed tab event