detected error in main.js
solved bug in main