fixed query condition for fetchAccounts