fix the "signal only works in main thread" also in scp