Fixed to work in jruby