Added workaround for Jruby bug