Fixes for JVM template