fixes to judge.rb