fixed search being turned off errors
Merge pull request #4 from Taoti/fixing-undefined-errors

fixed search being turned off errors