Fix approval upgrade on JRuby