fixed a bug in SimpleGUI.cpp