Fix connection on jruby