fix all the bugs on index page, finish issue #1