Fixed more bugs in indgen.js