fix bug in GUI