fix main.js and result.js bug