Fix: element Of undefined error