Automatically close empty tabs