added windows thread stub
fixed windows issues