Fixing query system to comply with new user stuff.