fixed 'cannot access 'el' of undefined' Error