Fixes by IRP

These fix some runtime and compilation problems we encountered while building the jar/war file with Ant, also present in the latest tagged release.