Consolidating Versions
Fixing property 'length' on undefined error