Fixed bug with CDB