fixed auth query error