fix bugs and now 'npm start' works