bug fix in MainServlet