queries fix