Fixes for Windows.

GUI is still unresponsive when receiving a message. Will have to figure
how to fix that later.