fixed bugs on servlet