Got rid of useless loop.