Some bug fixes for CCL