fixing long message spliting to work in jruby