Fixed issue with generated code