Bug fixes in registration and query message formats