Eachin should explicitly cast to the type of the loop variable.