Fixed bugs on index page, search now works