Fixing bug on first index page load.