fix template error in main.html file