Edit index page and fix bug