fix(rest) patched code from previous commit to make rest tests for tomcat work