Fix searching bug