renamed and fixed for jruby