Fix queries