fixed the bug in main CDP