fixed foolauth null queries