Workaround fix for enumeration out of range bug