fix multi thread signal bugs