Various tomcat agent fixes