Fixed if in generate.rb.