Fixed bug with dynamic generated code (use for regenerations)