Fixed GUI error

also made anonymous inner class insted of workerthread