patched for jruby