fixed GUI refresh bug

Please merge. Thanks.