fixed genlab.js