fixes in the template conversion from regular productions