fixed for jruby. added explantions.