Correcting errors in message passing systems