fix bugs, single instance works,  multiprocessing not work yet