fix tab switching / gadget focus bug