more queries fixes