Fixes: Code not being generated and issue  216

Sorry for all these fragmented pull requests.