fix tomcat memory leak bug