Fixed a bug in GUI