fix issues when testing against Tomcat/Repose