Search function not working on new pages