fixed bugs in SearchServlet