Bug fix for GUI