fixed some more queries