Added workaround for signal thread on Windows