Fix more queries stuff
more fixes