Fix window title not being updated when a tab is closed