fixed errors for searches being incorrect