Fixed the bug where widgets randomly disappear.