Hello, did you use SDK for this issue ?
Second when you read the mb content before did it you check the busy bit from Code Status of the mb ? In case that flag is still asserted then the content of MB is incoherent ! But be aware polling Code and Status Word of the MB will lock the mb in some cases like Code FULL or OVERRUN which will prevent writing another message in the MB.