Fixed code for index page