fixed 100% CPU problem under jruby