Fix for jruby compatability