Fix: uncaught exception: TypeError: Cannot call method 'push' of undefined