Fixed the bug in search

Fixed the bug in search