fix js error in main.js