minor fix while closing tab