fixed a bug in GUI