fixed GUI refreshing errors