code generation fixes
closes #5