modifying fix for adding new tab after closing all tab