fix errors in search