Fix critical tabWidget bug