fix data procesing in main.js