fix textwidth bug in panel