fix check.rb for empty array