Fixed a bug in CSE generation (phew!)