Improved fix for GUI.