fixed GUI refresh bug