fix compact in check.rb