CDB fixes and diagram fixes