Fix "undefined method `licenses='"  when running rake tasks