Attempt to fix problem with interleaved socket messages.