Update search.py

fixed bugs..