Fixed NPE on Tomcat 6.