Minor changes in messages code