bug fixing and search fixing