Fix more query structure