Fixed a bug of Enumerate.