Fixed message processing on windows