Fixed script to only run on search pages