increase code generation loading robustness