fix squeel queries