dialogWorker and fix bugs