Added some fixes to servlet.