Fixed handling of multiple messages in one read
Assign incoming messages to buffers