Minor changes in queries