Fixed KeyNotFoundException on the message headers