fix active tab selection. "this" changes regarding the context