Fix bug in gencode product