Update index.js
Merge pull request #3 from belyanskii/patch-1

Fix field generation