Reset key to 0 before iterating.