Tomcat leak

A couple of changes to try to improve tomcat memory leak, neither seem to make any differenct.