Fixing Search() function