Revert "Minor fix in TabWidget class"

This reverts commit 2b0b31a4ab489b669992c577688bfc02fa8e4a35.