Minor fixes for ObjectId and MessageType stat recording