Fixed some nuances in the queries