To fix 're-open closed tab' issue