fix request errors in main.js