fix bug with generating scripts from package.json