Revised some errors in main.c