bug fix on search