code generation fixes