Change the logic of loading index page