Removed redundant and unneeded loop.