Fixed bug in the CAF generator