Fixed case where you could delete the wrong tab