Take Dao creation out of loop.