correct the code in index page