fixed the bug for the index page