Fix compatibility issue about Enumerator