fix the bug for gui example

fix the bug for gui example