Some changes at messages code.