Fix the bug in Enumerate