Queries fix