Set source outside the loop.