Fixes enumeratePendingChanges logic