fixed GUI blocking problem