fix bug in random test query sequence operation (used to verify random query results)