Fixes for jruby