Fix for JRuby.