Fix more crappy queries