Fix validate.rb
Fix validation errors