Minor fixes to message system