More code generation bug fixes.