Fix: error in code generation when using reflection and non-primitive
types