Fixing bugs in search