Fix OSTF hang on tab switch