BugFix: CSR generation