improve search, bug fixed