bug fixed, signal catching fixed between threads