Bug Fix

TypeError: Cannot read property 'length' of undefined