Minor changes for message handling