Fix minor bugs in main_page.js