fix bugs in MyGUI