getprimary and getreseller fixes, add each for lazy looping