Many fixes in message model.