Added flags to QUERY message