Shouldn't this be after the loop?