fix closing of background tab