windows: some changes to wait/signal behaviour