Code fixes in generation mechanism subsection