Corrected some bugs in main.html

Fixed bugs with buttons in main.html