Fixing problem with receiving messages on Windows